import { formatDate } from 'pub-bbx-utils';
export default [
    {
        displayName: '消息标题',
        fieldName: 'messageTitle',
        formType: 'select',
        placeHolder: '请输入消息标题',
        isExport: false,
        isSystem: 1,
        isSearch: 1,
        orderId: 1,
        setting: {
            isMulti: false,
            dataSource: []
        }
    },
    {
        displayName: '消息类型',
        fieldName: 'messageType',
        formType: 'select',
        isExport: false,
        isSystem: 1,
        isSearch: 1,
        orderId: 2,
        setting: {
            isMulti: false,
            dataSource: [
              {
                text: '全部类型',
                value: ''
              },
              {
                text: '内部消息',
                value: '0'
              },
              {
                text: '客户消息',
                value: '1'
              },
            ]
        }
    },
    {
        displayName: '拨打号码',
        fieldName: 'callingTarget',
        formType: 'text',
        placeHolder: '请输入手机号',
        isExport: false,
        isSystem: 1,
        isSearch: 1,
        orderId: 3
    },
    {
        displayName: '按时间查询',
        fieldName: 'calledTime',
        formType: 'datetime',
        defaultTime: ['00:00:00', '23:59:59'],
        returnData: result => {
        if(!result) return { startTime: '', endTime: ''}
        let obj = {
            startTime: formatDate(result[0], 'YYYY-MM-DD HH:mm:ss'),
            endTime: formatDate(result[1], 'YYYY-MM-DD HH:mm:ss')
        };
        return obj;
        },
        isExport: false,
        isSystem: 1,
        isSearch: 1,
        orderId: 4
    },
    {
        displayName: '通话时长',
        fieldName: 'callingSpentTime',
        formType: 'text',
        isExport: false,
        isSystem: 1,
        isSystem: 0,
        orderId: 5
    },
    {
        displayName: '关联编号',
        fieldName: 'relatedNumber',
        formType: 'text',
        placeHolder: '请输入关联编号',
        isExport: false,
        isSystem: 1,
        isSearch: 1,
        orderId: 6
    },
    {
        displayName: '状态',
        fieldName: 'callingState',
        formType: 'select',
        isExport: false,
        setting: {
        isMulti: false,
        dataSource: [
            {
                text: '全部',
                value: ''
            },
            {
                text: '呼叫成功',
                value: 'success'
            },
            {
                text: '呼叫失败',
                value: 'fail'
            }
        ]
        },
        isSearch: 1,
        isSystem: 1,
        orderId: 7
    },
    {
        displayName: '说明',
        fieldName: 'explain',
        formType: 'text',
        isExport: false,
        isSystem: 1,
        isSystem: 0,
        orderId: 8
    }
]
